<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2019-2020 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace app\validate\bill;

use think\Validate;

class BillCateValidate extends Validate
{
    protected $rule = [
        'id' => 'require|number',
        'pid|费用类别' => 'require|number',
        'cate_name|分类名称' => 'require',
    ];


    public function sceneAdd()
    {
        return $this->remove('id', 'require');
    }

    public function sceneEdit()
    {
        return $this->remove('is_class', 'require');
    }

    public function sceneDel()
    {
        return $this->only(['id'])->append('id', 'require|number');
    }
}